package edu.pku.sei.transformation.editor.views.figures;

import org.eclipse.draw2d.CompoundBorder;
import org.eclipse.draw2d.Figure;
import org.eclipse.draw2d.Label;
import org.eclipse.draw2d.LineBorder;
import org.eclipse.draw2d.MarginBorder;
import org.eclipse.draw2d.XYLayout;
import org.eclipse.draw2d.geometry.Rectangle;

public class TestCaseFigure extends Figure {
	private Label name = new Label("test case");
	public TestCaseFigure() {
		this.setLayoutManager(new XYLayout());
		this.setBorder(new LineBorder(1));
		CompoundBorder border = new CompoundBorder(new BendCornerBorder(1), new MarginBorder(5));
		name.setBorder(border);
		this.add(name);
	}
	
	@Override
	public void setBounds(Rectangle rect) {
		super.setBounds(rect);
		name.setLocation(rect.getLocation());
		name.setSize(name.getPreferredSize());
	}
}
